<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateWechatNewsCategoriesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wechat_news_categories', function (Blueprint $table) {
            $table->id()->comment('图文消息管理表');
            $table->string('cate_name',255)->comment('图文名称');
            $table->integer('sort')->comment('排序');
            $table->integer('news_id')->index()->comment('文章id');
            $table->string('cate_image',255)->nullable()->comment('附图');
            $table->tinyInteger('status')->comment('状态 0是禁用 1是启用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wechat_news_categories');
    }
}
